# -*- coding: utf-8 -*-
import requests

if __name__ == '__main__':
    kw = {'wd': '华为'}
    res = requests.get('http://www.baidu.com/s?', params=kw)
    # filename = '}_baidu.html'.format(kw)
    # print(filename)
    f = open(r'baidu.html', 'w')
    f.write(res.text)
    # print('res text:', res.text)
    print('res url:', res.url)
    # print('res content:', res.content)
